Report post

How do I use unset in CSS?

unset can be applied to any CSS property, including the CSS shorthand property all. color is an inherited property. border is a non-inherited property. Use the initial keyword to set a property to its initial value. Use the inherit keyword to make an element's property the same as its parent.

What is a unset CSS keyword?

UNSET The unset CSS keyword is the combination of the initial and inherit keywords. Like these two other CSS-wide keywords, it can be applied to any CSS property, including the CSS shorthand all. This keyword resets the property to its inherited value if it inherits from its parent or to its initial value if not.

What is the difference between initial and unset in CSS?

Therefore according to your example: color:initial; /* color:unset; */ this text is red this text is in the initial color (e.g. black) this is red again Note how the initial property retains the initial the color property of the element. UNSET The unset CSS keyword is the combination of the initial and inherit keywords.

The World's Leading Crypto Trading Platform

Get my welcome gifts